package indi.zhifa.expshare.class001.chemicalmatch.dao;

import indi.zhifa.expshare.class001.chemicalmatch.entity.po.NickNameMongoData;
import indi.zhifa.expshare.class001.chemicalmatch.enums.EModuleType;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface INickNameRepository extends MongoRepository<NickNameMongoData, String> {
    NickNameMongoData findByModuleAndSubModuleAndName(EModuleType pModule, String pSubModule, String pName);
    NickNameMongoData findByModuleAndSubModuleAndNickNamesContains(EModuleType pModule,String pSubModule, String pNickName);
    Integer countBySubModule(String pSubModule);
    List<String> findDistinctNameBySubModule(String subModule);
}
